apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
kind: DestinationRule
metadata:
  name: <%= app.baseName.toLowerCase() %>-destinationrule
  namespace: <%= kubernetesNamespace %>
spec:
  host: <%= app.baseName.toLowerCase() %>
  trafficPolicy:
    loadBalancer:
      simple: RANDOM
    connectionPool:
      tcp:
        maxConnections: 30
        connectTimeout: 100ms
      http:
        http1MaxPendingRequests: 10
        http2MaxRequests: 100
        maxRequestsPerConnection: 10
        maxRetries: 5
    outlierDetection:
      consecutiveErrors: 5
      interval: 30s
      baseEjectionTime: 60s
  subsets:
  - name: v1
    labels:
      version: "v1"
